package cn.xopencode.oss.rpc.passport.vo;

import cn.xopencode.common.framework.validator.Mobile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@ApiModel("用户名密码登陆 Request VO")
@Data
@Accessors(chain = true)
public class PassportLoginByUserNameReqVO implements Serializable {

    @ApiModelProperty(value = "用户名", required = true, example = "tianqiongenze")
    @NotEmpty(message = "用户名不能为空")
    private String username;

    @ApiModelProperty(value = "登录密码", required = true, example = "101024")
    @NotEmpty(message = "登录密码不能为空")
    @Length(min = 4, max = 6, message = "登录密码长度为 4-6 位")
    @Pattern(regexp = "^[0-9]+$", message = "登录密码必须都是数字")
    private String password;

}
